
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ttg_internal.utils;

namespace SampleUtility
{
    public partial class SampleViewer : Form
    {
        private GlobalInfo _info;
        public SampleViewer(GlobalInfo info)
        {
            _info = info;
            InitializeComponent();
        }

        private void timer_Tick(object sender, EventArgs e)
        {
            try
            {
                textBox.Text = GlobalInfoPrinter.PrintInfo(_info);
            }
            catch (Exception ex)
            {
                this.textBox.Text = ex.ToString();
            }
        }

        private void SampleViewer_FormClosing(object sender, FormClosingEventArgs e)
        {
            Hide();
            e.Cancel = true;
        }
    }
}